package cn.pdd.entity;

public class Student {
    private String stuName;
    private int age;
    private Teacher teacher;

    public Student() {
    }

    public Student(String stuName) {
        this.stuName = stuName;
    }

    public Student(int age) {
        this.age = age;
    }

    public Student(Teacher teacher) {
        this.teacher = teacher;
    }

    public Student(String stuName, int age, Teacher teacher) {
        this.stuName = stuName;
        this.age = age;
        this.teacher = teacher;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuName='" + stuName + '\'' +
                ", age=" + age +
                ", teacher=" + teacher +
                '}';
    }

    public void study(){
        System.out.println(this.stuName+"在拼命吃屎,吃了"+this.age+"年");
    }
}
